#ifndef _SERVERDATA
#define _SERVERDATA
#include "Windows.h"

#ifdef _cplusplus
extern "C"
{
#endif 
typedef struct _SERVERDATA
{
	
}SERVERDATA;

//may be it is a library of itues or media library
typedef struct _SERVERDATA_SHAREDFOLDER
{
	TCHAR	id[MAX_PATH];
	TCHAR	szPath[MAX_PATH];
}SERVERDATA_SHAREDFOLDER;

enum eFileType
{
	FileType_Video,
	FileType_Audio,
	FileType_Image,
	FileType_Document,
	FileType_Binary,
	FileType_HTML
};

typedef struct _SERVERDATA_MEDIA
{
	TCHAR	id[MAX_PATH];
	TCHAR	szPath[MAX_PATH];//full path
	TCHAR	szName[MAX_PATH];
	int 	isFolder;
	eFileType FileType;
}SERVERDATA_MEDIA;


int SetXMLData(const char * xmlbuf);

// folder list XML
int GetShareFolderListCount(int* Count);
int GetShareFolderListItem(int Index,SERVERDATA_SHAREDFOLDER* pSharedFolder);

// folder item information XML
int GetShareItemCount(int* Count);
int GetShareItemInfo(int Index,SERVERDATA_MEDIA* pMedia);

int AddShareFolder(TCHAR* pPath);
int RemoveShareFolder(TCHAR* pPath);

int AddSharedMediaInfo(SERVERDATA_MEDIA* pMedia);
int RemoveSharedMediaInfo(SERVERDATA_MEDIA* pMedia);

#ifdef _cplusplus
}
#endif
#endif